SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[paObtenerUsuario]
AS
SET NOCOUNT ON


SELECT U.Modo, O.CUISE , R.Organizacion, U.IdReparticion As Reparticion
FROM tb_Usuarios U
INNER JOIN tb_Reparticiones R ON R.IdReparticion = U.IdReparticion
INNER JOIN tb_Organizaciones O ON O.IdOrganizaciones = R.Organizacion
WHERE U.NTUser = SYSTEM_USER
GO
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Alumnos]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Becas]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [CentroDeDesignaciones]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Certificaciones]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [CertificacionesAdministracion]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [CertificacionesServicios]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Coordinaciones]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [DepartamentoTecnicoContable]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Direcciones De Nivel]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [GestionInstitucional]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Informatica]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Juntas]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [MCEEjecutivo]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [PersonalDocente]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [PersonalDocenteDireccion]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [RegistroTitulos]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [SaludLaboral]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [SoloVer]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [Subsidios]
GRANT EXECUTE ON  [dbo].[paObtenerUsuario] TO [SubsidiosConsulta]
GO
